import type { RouteRecordStringComponent } from '@vben/types';

import { requestClient } from '#/api/request';

/**
 * 获取用户所有菜单
 * @param userRoles 用户角色列表
 */
export async function getAllMenusApi(userRoles?: string[]) {
  return requestClient.get<RouteRecordStringComponent[]>('/menu/all', {
    params: {
      userRoles: userRoles?.join(',')
    }
  });
}
